home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2011 January / SAN CD 1-2011 CD-ROM 68.iso / pc / issueMedia / Software / AviStack2 / IDL70 / help / widget / annotate.txt next >
Encoding:
Text File  |  2007-11-08  |  9.4 KB  |  238 lines

  1.                     Annotation Widget
  2.  
  3. The Annotation widget allows you to interactively annotate images and
  4. plots with text and drawings. Drawing objects include lines, arrows,
  5. polygons, rectangles, circles, and ellipses. Annotation files can be
  6. saved and restored, and annotated displays can be written to TIFF, PNG,
  7. or PostScript files. The Annotation widget will work on any IDL graphics
  8. window or draw widget.
  9.  
  10.                     Using the Annotation Widget
  11.  
  12. Before calling the Annotation widget, plot or display your data in an
  13. IDL graphics window or draw widget. Unless you specify otherwise (using
  14. the DRAWABLE or WINDOW keywords to ANNOTATE), annotations will be made
  15. in the current graphics window.
  16.  
  17.  
  18. MODES
  19.  
  20. The Annotation widget has three modes of operation: Draw, Edit, and Select.
  21.  
  22. - Draw Mode
  23.   Allows you to design and create new annotation objects.
  24.  
  25. - Edit Mode
  26.   Allows you to move, resize, or otherwise change existing
  27.   annotation objects. In Edit Mode, "handles" appear on the
  28.   annotation object.
  29.  
  30. - Select Mode
  31.   Allows you to choose an existing annotation object for editing.
  32.   Select an object by clicking the left mouse button in the center
  33.   of the object. When you release the mouse button, the object's
  34.   handles will appear and the Annotation widget will switch to
  35.   Edit Mode.
  36.  
  37. Select a mode by clicking on the appropriate Mode Button. You can also
  38. switch between Draw Mode and Edit Mode by clicking the middle mouse button.
  39.  
  40.  
  41. SAVING OBJECTS
  42.  
  43. Once you have created an annotation object, you must save it before
  44. going on to create another. Save objects either by clicking on the "Save"
  45. button or by clicking the right mouse button when the annotation object
  46. to be saved is selected. If the object is not saved and you switch from
  47. one type of object to another, the unsaved object will be removed from
  48. the annotation. When the object has been saved, the mode switches 
  49. automatically from "Edit" to "Draw".
  50.  
  51. To change a saved object, choose Select Mode, select the object and edit
  52. it. Note that once an object is selected, it is removed from the "saved"
  53. list and thus must be saved again after modification.
  54.  
  55.  
  56. ANNOTATION OBJECTS
  57.  
  58. The Annotation widget supports five types of annotation objects:
  59. Text, Lines and Arrows, Polygons and Polylines, Ellipses, and Rectangles.
  60. The different objects are represented by a row of bitmap buttons in
  61. the Annotation widget. To select a type of annotation, click on the
  62. appropriate button. The lower portion of the Annotation widget changes
  63. to present the controls available for that type of object.
  64.  
  65. NOTE: If you switch from one type of object to another before saving
  66. an object, the unsaved object will be deleted.
  67.  
  68. - Text 
  69.   To create a text annotation, enter the text in the field labelled
  70.   "Text", then click with the left mouse button in the image. Your
  71.   annotation text appears and the mode switches immediately to "Edit."
  72.   Resize or rotate the annotation text using the mouse by clicking
  73.   on one of the handles and dragging, or adjust the "Size" and 
  74.   "Orientation" sliders. Adjust the thickness of the text line strokes
  75.   using the "Thickness" slider.
  76.  
  77.   Use the "Font" selection widget to select a font. Text can be aligned
  78.   to the left, right, or center by selecting the appropriate button.
  79.  
  80. - Lines and Arrows
  81.   To create a line or arrow, click with the left mouse button and
  82.   drag the mouse until you have created the desired line. Click on the
  83.   "Arrow" button to create an arrow or on "Solid Arrow" to create an
  84.   arrow with a filled triangle as its head. Adjust the size of the 
  85.   arrowhead by moving the "Head Size" slider.
  86.   
  87. - Polygons and Polylines
  88.   The Polygon/Polyline tool has three sub-modes:
  89.  
  90.   - Draw: (the initial mode). Drag or click the left mouse button
  91.     to add points to the object, connecting the most recent point to the
  92.     mouse position.
  93.   - Edit: Select and move a vertex or point by clicking and dragging
  94.     with the left mouse button.
  95.   - Delete: Remove the vertex or point closest to the cursor position
  96.     when the left mouse button is pressed.
  97.  
  98.   Polygons can be unfilled, filled with a solid color, or filled with
  99.   parallel lines by selecting the appropriate button next to the "Fill"
  100.   label. If an object is filled with lines, the angle of the lines and
  101.   the spacing between them can be adjusted using the "Line Angle" and
  102.   "Line Spacing" sliders.
  103.  
  104.   Choosing "Spline" next to the "Interpolation" label will produce
  105.   objects constructed of smooth curves rather than polygons.
  106.  
  107. - Ellipses
  108.   To create an ellipse, click with the left mouse button at the point
  109.   you wish to be the center of the ellipse and drag until the
  110.   ellipse is the desired size. Adjust the eccentricity of the ellipse
  111.   using the "Eccentricity" slider.
  112.  
  113.   Ellipses can be unfilled, filled with a solid color, or filled with
  114.   parallel lines by selecting the appropriate button next to the "Fill"
  115.   label. If an object is filled with lines, the angle of the lines and
  116.   the spacing between them can be adjusted using the "Line Angle" and
  117.   "Line Spacing" sliders.
  118.  
  119. - Rectangles
  120.   To create a rectangle, click with the left mouse button at the point
  121.   you wish to be the upper left corner of the rectangle and drag until
  122.   the rectangle is the desired size.
  123.  
  124.   Rectangles can be unfilled, filled with a solid color, or filled with
  125.   parallel lines by selecting the appropriate button next to the "Fill"
  126.   label. If an object is filled with lines, the angle of the lines and
  127.   the spacing between them can be adjusted using the "Line Angle" and
  128.   "Line Spacing" sliders.
  129.  
  130.  
  131. COLOR
  132.  
  133. The color of any annotation object can be changed by selecting the
  134. object and picking a new color from the Annotation widget color bar.
  135.  
  136.  
  137. LINESTYLE
  138.  
  139. You can adjust the thickness of lines and text using the "Thickness"
  140. slider. You can change the style of lines and shapes using the
  141. "Linestyle" selection widget. Note that fill lines are not affected
  142. by the choice of line style.
  143.  
  144.  
  145. CURSOR POSITION
  146.  
  147. The current cursor position with the graphics window is shown (in
  148. pixel coordinates) in the window in the center of the Annotation
  149. widget.
  150.  
  151.  
  152. THE FILE MENU
  153.  
  154. The File menu (at the upper left-hand corner of the Annotation widget)
  155. contains the following items:
  156.  
  157. - Load
  158.   Load a saved annotation file into the current graphics window.
  159.   A file-selection dialog allows you to select a previously-saved
  160.   annotation file. When restoring objects, be sure that the window
  161.   you are loading into has the same geometry as did the window from
  162.   which the objects were saved.
  163.  
  164. - Save
  165.   Save the current annotations in a file. If an annotation file has
  166.   not yet been opened or specified using the "Save As" menu option,
  167.   the file will be named "annotate.dat" and placed in the current
  168.   directory.  Note that only the annotations, and not the underlying
  169.   image or plot, are saved.
  170.  
  171. - Save As
  172.   Save the current annotations in a file. A file-selection dialog
  173.   allows you to name the resulting file. Annotation files have the
  174.   suffix ".dat" by default. Note that only the annotations, and not
  175.   the underlying image or plot, are saved.
  176.  
  177. - Write PostScript
  178.   Create a PostScript file of your annotations. This menu choice reveals
  179.   a submenu allowing you to choose "Everything" or "Objects only".
  180.  
  181.   Choose "Everything" to output the contents of the graphics window
  182.   (your original plot or image) as a bitmap, and the annotation
  183.   objects as PostScript drawing commands. This creates a single file
  184.   and provides the best resolution.
  185.  
  186.   Choose "Objects only" to save only the annotation objects. Use this
  187.   mode to combine the annotations with PostScript commands that have
  188.   already been output to obtain the highest resolution. To use this
  189.   procedure, take the following steps:
  190.  
  191.   1) Open the PostScript device and create the plot over which you
  192.   wish your annotations to appear.  Be sure that it has the same aspect
  193.   ratio as does you drawing window.  For example, if you have a 640 x
  194.   512 drawing window, and you wish to make your PostScript drawing 4
  195.   inches wide, the PostScript height or YSIZE must be set to 4.0 * 512 /
  196.   640 = 3.2 inches, e.g. DEVICE, XSIZE=4, YSIZE=3.2, /INCHES.
  197.  
  198.   2) Select the window system as your plot device, and re-execute the
  199.   commands that produced the background you wish to annotate.
  200.  
  201.   3) Call ANNOTATE, make your annotations, and then use this option to
  202.   output the PostScript.  The PostScript device is not closed upon
  203.   completion, as it is with the other two PostScript output options.
  204.  
  205. - Export Bitmap
  206.   Convert the entire contents of the graphics window (image and
  207.   annotations) to a bitmap and output in the format you choose.
  208.   The options available are PNG, PostScript, and TIFF.
  209.  
  210. - Clear
  211.   Clear the graphics window of all annotations.
  212.  
  213. - Exit
  214.   Exit the Annotation widget.
  215.  
  216. OPTIONS BUTTON
  217.  
  218. Click on the "Options" button to select various types of PostScript
  219. output:
  220.  
  221. - Standalone or Encapsulated (to be inserted into another document).
  222.  
  223. - Monochrome or Color, always use Monochrome unless you have a color
  224.   PostScript printer.
  225.  
  226. - Portrait or Landscape.
  227.  
  228. The width parameter scales the output size. The height of the output
  229. drawing is scaled from the width to retain the same aspect ratio as
  230. the original drawing window.
  231.  
  232.  
  233. CALLING THE ANNOTATION WIDGET
  234.  
  235. For information on how to call the Annotation widget from your
  236. program, see ANNOTATE in the IDL Reference Guide or the IDL
  237. on-line help.
  238.